
	<div class="row">
	<?if(isset($system_message))echo $system_message;?>
	<?php 
		$formAttrib = array('id' => 'addsubject', 'class' => 'admin-form');
		$roomLevelAttrib = array('' => 'Select level assignment..');
		$subjectNameAttrib = array('name' => 'code', 'value' => set_value('code'), 'id' => 'name');
		$subjectDescriptionAttrib = array('name' => 'description', set_value("description"), 'id' => 'description');
		$subjectStatusAttrib = array('active' => 'Active', 'inactive' => 'Inactive');
		echo form_open('admin/add_subject', $formAttrib);

	?>
    
    <div class="input-block">
      <?php
		  echo form_label('Grade Level :', 'grade_level_id');
		if(!empty($levels)){
		  echo form_dropdown('grade_level_id', $levels, set_value('grade_level_id',$selected_grade_level_id),'id="grade_level_id"') ;	
		}else{
		  echo 'Grade Level is empty, please <a href="'.site_url('admin/add_grade_level').'" class="data-link">set grade levels </a>';
		}
	  ?>
    </div><br>
	<div class="input-block">
		<label>Academic Year:</label>
		<? if(!empty($academic_year)):?>
		<?php echo form_dropdown('academic_year', $academic_year);	?>
		<?else:?>
			<a href="<?=site_url('admin/add_school_year');?>" class="data-link">Set academic_year</a>
		<?endif;?>
	</div><br>
	
    <div class="input-block">
    <?php
		echo form_label('Subject Code :', 'name');
		echo form_input($subjectNameAttrib);		
	?>
    </div>
	
	<div class="input-block">
		<label>Unique Alphanumeric ID</label>
		<input type="text" name="subj_uniq_id" value="<?=set_value('subj_uniq_id');?>" required placeholder="Enter Alphanumeric Unique ID for Subject">
    </div>
    
	<div class="input-block">
		<label>Subject Description</label>
		<input type="text" name="description" value="<?=set_value('description');?>">
    </div>
    
    <div class="input-block">
    <?php
		echo form_label('Subject Status :', 'subj_stat');
		echo form_dropdown('subj_stat', $subjectStatusAttrib, 'active');	
	?>
    </div>
	
	<div class="input-block">
		<label>Subject Unit:</label>
		<input type="number" max="10" min="0" required name="subject_unit" value="<?=set_value('subject_unit');?>">
	</div>
	
	
   
    <div class="input-block" style="clear:both;">
		<?php echo form_submit('add', 'Add','class="btn btn-small btn-primary"'); ?>
		<a href="<?=site_url('admin/subjects');?>" class="btn">Back to Subjects</a>
	</div>

	</div>